package com.h3c.grpc.helloworld;

import io.grpc.stub.StreamObserver;

/**
 * Created by Administrator on 2017/6/12.
 */
public class GreeterGrpcImpl extends GreeterGrpc.GreeterImplBase {
    @Override
    public void sayHello(HelloRequest request, StreamObserver<HelloReply> responseObserver) {
        //
        System.out.println(request.getName());

        HelloReply reply = HelloReply.newBuilder().setMessage("This is Server Method: Hello " + request.getName()).build();
        responseObserver.onNext(reply);
        responseObserver.onCompleted();
    }
}
